/* 
 * Unique Paths II
 */

#include "../func.h"

vector<vector<int>> f;
int uniquePathWithObstacle(vector<vector<int>> &obstacleGrid)
{
    const int m = obstacleGrid.size();
}
int dfs(vector<vector<int>> &obstacleGrid, int x, int y)
{
    if (x < 0 || y < 0)
        return 0;

    if (obstacleGrid[x][y])
        return 0;

    if (0 == x || 0 == y)
        return f[0][0];

    if (f[x][y] > 0)
        return f[x][y];
    else
    {
        return f[x][y] = dfs(obstacleGrid, x - 1, y) + dfs(obstacleGrid, x, y - 1);
    }
}